/**
 * 角色表单
 */
import { ref } from 'vue'
import { FormItemProps } from '../../../components/base/form-item/props/index'
import { role } from '../../../entity/system/user'
import { TreeSelect } from 'ant-design-vue'
export const formItems = ref<Array<FormItemProps<role>>>([
  {
    type: 'input',
    name: 'name',

    label: '角色名',
    placeholder: '用户名',
    rules: [{ required: true, message: '请输入用户名' }],
  },
  {
    type: 'tree-select',
    name: 'sysRoleMenus',
    label: '角色菜单',
    placeholder: '角色菜单',
    params: {
      treeData: [],
      multiple: true,
      fieldNames: {
        children: 'children',
        label: 'name',
        value: 'id',
      },
      treeCheckable: true,
      allowClear: true,
      showCheckedStrategy: TreeSelect.SHOW_ALL,
    },
  },
])
